package com.maimao.upload.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.upload.client.fallback.BrandFallBackFactory;
import com.maimao.upload.client.fallback.UserFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2020/11/30 9:45 下午
 */
@FeignClient(value = ServiceContainer.USER_SERVICE, fallbackFactory = UserFallBackFactory.class, configuration = FeignInterceptor.class)
public interface UserClient {

    @GetMapping("/web/member/idcard-images")
    Result<Map<String, String>> getIdCardUrlByUid(@RequestParam("userId")Long userId);

    /**
     * 修改证件地址
     */
    @PostMapping("/web/member/idcard-update")
    Result<Void> updateIdCard(@RequestBody Map<String, String> updateParams);
}
